    /*******************************************************************************
         *
         *    Copyright (c) Baina Info Tech Co. Ltd
         *
         *    Timer TurnOff
         *    
         *    BluetoothManager
         *    TODO File description or class description.
         *
         *    @author: zuochen
         *    @since:  2011-10-9
         *    @version: 1.0
         *
         ******************************************************************************/

package com.sdk.hardware.manager;

import android.content.Context;


/**
 * BluetoothManager of Timer TurnOff.
 * @author zuochen
 *
 */

public class BluetoothManager {
	/**
	 * 打开BlueTooth
	 * @param context
	 */
	public static void turnOnBlueTooth(Context context){
		 BluetoothControl mBluetoothControl;
		try {
			// try with 1.6
			mBluetoothControl = new BluetoothControl16(context);
		} catch (final Exception e) {
			mBluetoothControl = new BluetoothControl20(); // 2.0+ adapter
		}
		mBluetoothControl.setEnabled(true);
	}
	
	/**
	 * 打开BlueTooth
	 * @param context
	 */
	public static void turnOffBlueTooth(Context context){
		 BluetoothControl mBluetoothControl;
		try {
			// try with 1.6
			mBluetoothControl = new BluetoothControl16(context);
		} catch (final Exception e) {
			mBluetoothControl = new BluetoothControl20(); // 2.0+ adapter
		}
		mBluetoothControl.setEnabled(false);
	}
}
